package Day009_Map_斗地主_冒泡排序.ZuoYe;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Random;

public class Test5 {
    public static void main(String[] args) {
        Random ran = new Random();

        //创建一个由6个 1-33数字组成的 数组
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < 6; i++) {
            int a = ran.nextInt(33) + 1;
            list.add(a);
        }
        System.out.println(list);
        //
        int b = ran.nextInt(16) + 1;

        //创建map集合 限制类型为ArrayList集合,Integer
        HashMap<ArrayList<Integer>,Integer> map = new HashMap<>();
        //将list的6个随机数 作为键, b作为值
        map.put(list,b);
        System.out.println(map); // {[12, 25, 12, 10, 17, 20]=15}
                                 // {[18, 7, 11, 28, 27, 12]=2}
                                 // {[18, 14, 6, 30, 14, 13]=13}
    }
}
